<html><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta content="text/javascript" http-equiv="content-script-type">
<title>tango.util.collection.impl.DefaultComparator</title>

<link rel="stylesheet" type="text/css" href="css/style.css">
<!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="css/ie56hack.css"><![endif]-->
<script language="JavaScript" src="js/util.js" type="text/javascript"></script>
<script language="JavaScript" src="js/tree.js" type="text/javascript"></script>
<script language="JavaScript" src="js/explorer.js" type="text/javascript"></script>
<script>
function anchorFromTitle(title, path, ext) {
  var url = path + title + "." + ext;
  document.write("<a href='" + url + "'>" + title + "</a>");
  }
</script>
</head><body>
<div id="tabarea"></div><div id="explorerclient"></div>
<div id="content"><script>explorer.initialize("tango.util.collection.impl.DefaultComparator");</script>
        <table class="content">
                <tr><td id="docbody"><h1><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/impl/DefaultComparator.d?rev=3327">tango.util.collection.impl.DefaultComparator</a></h1>
                
<script>explorer.outline.incSymbolLevel();</script>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>class <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/impl/DefaultComparator.d?rev=3327#L32">DefaultComparator</a></span>
<script>explorer.outline.addDecl('DefaultComparator');</script>(T) : Comparator!(T);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">DefaultComparator provides a general-purpose but slow compare
 operation. 
 
        </font><br><br>
<b>author:</b><br>Doug Lea
 @version 0.93<br><br> <P> For an introduction to this package see <A HREF="index.html"> Overview </A>.<br><br>
<script>explorer.outline.incSymbolLevel();</script>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>int <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/impl/DefaultComparator.d?rev=3327#L48">compare</a></span>
<script>explorer.outline.addDecl('compare');</script>(T <span class="funcparam">fst</span>, T <span class="funcparam">snd</span>); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Try various downcasts to find a basis for
 comparing two elements. If all else fails, just compare
 hashCodes&#40;&#41;. This can be effective when you are
 using an ordered implementation data structure like trees,
 but don't really care about ordering.</font><br><br>
<font color="black">@param fst first argument
 @param snd second argument
 </font><br><br>
<b>Returns:</b><br>
a negative number if fst is less than snd; a
 positive number if fst is greater than snd; else 0<br><br></dd></dl>
<script>explorer.outline.decSymbolLevel();</script></dd></dl>
<script>explorer.outline.decSymbolLevel();</script></td></tr>
                <tr><td id="docfooter">
                         :: page rendered by CandyDoc. Generated by <a href="http://code.google.com/p/dil">dil</a> on Tue Mar  4 22:45:34 2008.
                </td></tr>
        </table>
</div>
<script></script>
</body></html>